package com.ydj.app.entity.dao.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ydj.app.entity.Kol;
import com.ydj.app.entity.dao.KolDao;
import com.ydj.app.entity.mapper.KolMapper;
import com.ydj.app.entity.query.KolQuery;
import org.springframework.stereotype.Repository;

@Repository
public class KolDaoImpl extends ServiceImpl<KolMapper, Kol> implements KolDao {
    @Override
    public boolean existName(String name) {
        long count = new KolQuery(this)
                .name(name)
                .limit(1)
                .count();
        return count > 0;
    }
}